package cn.jzq.kotoba.modules.sharding.service.impl;

import cn.jzq.kotoba.modules.sharding.controller.StudentController;
import cn.jzq.kotoba.modules.sharding.mapper.StudentMapper;
import cn.jzq.kotoba.modules.sharding.model.entity.Student;
import cn.jzq.kotoba.modules.sharding.service.StudentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author jzq
 * @date 2018-09-16
 */
@Service
public class StudentServiceImpl extends ServiceImpl<StudentMapper, Student> implements StudentService {
    @Autowired
    private StudentMapper studentMapper;
    @Autowired
    private StudentController studentController;


//    @Autowired
//    public StudentServiceImpl(StudentMapper studentMapper, StudentController studentController) {
//        studentController.getStudent(1L);
//        this.studentMapper = studentMapper;
//        this.studentController = studentController;
//    }


    @Override
    public List<Student> injectionTest() {
        studentController.getStudent(1L);
        return studentMapper.listAll();
    }
}
